import {request} from '@umijs/max';

export function login(body:API.User_Login){
    return request<string>('/user/login',{
        method:'POST',
        data:body
    })
}
export function queryUserList(body:API.User_Query_Body){
    return request<API.PageInfo<API.UserInfo>>('/user/list',{
        method:'POST',
        data:body
    })
}
export function addUser(body:API.User_Add_Body){
    return request<null>('/user/add',{
        method:'POST',
        data:body
    })
}
export function change_pwdUser(body:API.User_ChangePwd_Body){
    return request<null>('/user/change_pwd',{
        method:'POST',
        data:body
    })
}
export function configUser(body:API.User_ConfigRole_Body){
    return request<null>('/user/config_role',{
        method:'POST',
        data:body
    })
}
export function removeUser(name:string){
    return request<null>(`/user/remove/${name}`,{
        method:'POST'
    })
}